package com.ktjy.controller;

import com.ktjy.pojo.SysUser;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("/boot")
public class BootStrapController {

    @ResponseBody
    @RequestMapping("/bootstrap")
    public String bootStrap(Model model) {
        List<SysUser> list = new ArrayList<SysUser>();
        SysUser sysUser1 = new SysUser();
        sysUser1.setId(1L);
        sysUser1.setAccount("zhangsan");
        SysUser sysUser2 = new SysUser();
        sysUser2.setId(2L);
        sysUser2.setAccount("lisi");
        list.add(sysUser1);
        list.add(sysUser2);
        model.addAttribute("list",list);
        return "bootStrap";
    }
}
